//
//  JUserInfoModel.m
//  HeadIndustry
//
//  Created by jun on 2017/9/1.
//  Copyright © 2017年 jun. All rights reserved.
//

#import "JUserInfoModel.h"

@interface JUserInfoModel()<NSCopying,NSCoding>

@end

@implementation JUserInfoModel


#pragma mark - NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeInteger:_CustomerId forKey:@"CustomerId"];
    [aCoder encodeInteger:_Active forKey:@"Active"];
    [aCoder encodeInteger:_AffiliateId forKey:@"AffiliateId"];
    [aCoder encodeInteger:_Deleted forKey:@"Deleted"];
    [aCoder encodeInteger:_HasShoppingCartItems forKey:@"HasShoppingCartItems"];
    [aCoder encodeInteger:_Id forKey:@"Id"];
    [aCoder encodeInteger:_IsSystemAccount forKey:@"IsSystemAccount"];
    [aCoder encodeInteger:_IsTaxExempt forKey:@"IsTaxExempt"];
    [aCoder encodeInteger:_PasswordFormat forKey:@"PasswordFormat"];
    [aCoder encodeInteger:_PasswordFormatId forKey:@"PasswordFormatId"];
    [aCoder encodeInteger:_Score forKey:@"Score"];
    [aCoder encodeInteger:_Sex forKey:@"Sex"];

    [aCoder encodeObject:_ReturnRequests forKey:@"ReturnRequests"];
    [aCoder encodeObject:_ShoppingCartItems forKey:@"ShoppingCartItems"];
    [aCoder encodeObject:_ExternalAuthenticationRecords forKey:@"ExternalAuthenticationRecords"];
    [aCoder encodeObject:_CustomerRoles forKey:@"CustomerRoles"];
    [aCoder encodeObject:_Addresses forKey:@"Addresses"];
    [aCoder encodeObject:_AdminComment forKey:@"AdminComment"];
    [aCoder encodeObject:_BillingAddress forKey:@"BillingAddress"];
    [aCoder encodeObject:_CreatedOnUtc forKey:@"CreatedOnUtc"];
    [aCoder encodeObject:_CustomerGuid forKey:@"CustomerGuid"];
    [aCoder encodeObject:_Email forKey:@"Email"];
    [aCoder encodeObject:_HeadImg forKey:@"HeadImg"];
    [aCoder encodeObject:_LastActivityDateUtc forKey:@"LastActivityDateUtc"];
    [aCoder encodeObject:_LastIpAddress forKey:@"LastIpAddress"];
    [aCoder encodeObject:_LastLoginDateUtc forKey:@"LastLoginDateUtc"];
    [aCoder encodeObject:_NickName forKey:@"NickName"];
    [aCoder encodeObject:_OpenId forKey:@"OpenId"];
    [aCoder encodeObject:_Password forKey:@"Password"];
    [aCoder encodeObject:_PasswordSalt forKey:@"PasswordSalt"];
    [aCoder encodeObject:_ShippingAddress forKey:@"ShippingAddress"];
    [aCoder encodeObject:_Signature forKey:@"Signature"];
    [aCoder encodeObject:_SystemName forKey:@"SystemName"];
    [aCoder encodeObject:_Tel forKey:@"Tel"];
    [aCoder encodeObject:_Username forKey:@"Username"];
    [aCoder encodeObject:_VendorId forKey:@"VendorId"];
    [aCoder encodeObject:_Unionid forKey:@"Unionid"];

}

- (id)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        _CustomerId = [aDecoder decodeIntegerForKey:@"CustomerId"];
        _Active = [aDecoder decodeIntegerForKey:@"Active"];
        _AffiliateId = [aDecoder decodeIntegerForKey:@"AffiliateId"];
        _Deleted = [aDecoder decodeIntegerForKey:@"Deleted"];
        _HasShoppingCartItems = [aDecoder decodeIntegerForKey:@"HasShoppingCartItems"];
        _Id = [aDecoder decodeIntegerForKey:@"Id"];
        _IsSystemAccount = [aDecoder decodeIntegerForKey:@"IsSystemAccount"];
        _IsTaxExempt = [aDecoder decodeIntegerForKey:@"IsTaxExempt"];
        _PasswordFormat = [aDecoder decodeIntegerForKey:@"PasswordFormat"];
        _PasswordFormatId = [aDecoder decodeIntegerForKey:@"PasswordFormatId"];
        _Score = [aDecoder decodeIntegerForKey:@"Score"];
        _Sex = [aDecoder decodeIntegerForKey:@"Sex"];

        _ReturnRequests = [aDecoder decodeObjectForKey:@"ReturnRequests"];
        _ShoppingCartItems = [aDecoder decodeObjectForKey:@"ShoppingCartItems"];
        _ExternalAuthenticationRecords = [aDecoder decodeObjectForKey:@"ExternalAuthenticationRecords"];
        _CustomerRoles = [aDecoder decodeObjectForKey:@"CustomerRoles"];
        _Addresses = [aDecoder decodeObjectForKey:@"Addresses"];
        _AdminComment = [aDecoder decodeObjectForKey:@"AdminComment"];
        _BillingAddress = [aDecoder decodeObjectForKey:@"BillingAddress"];
        _CreatedOnUtc = [aDecoder decodeObjectForKey:@"CreatedOnUtc"];
        _CustomerGuid = [aDecoder decodeObjectForKey:@"CustomerGuid"];
        _Email = [aDecoder decodeObjectForKey:@"Email"];
        _HeadImg = [aDecoder decodeObjectForKey:@"HeadImg"];
        _LastActivityDateUtc = [aDecoder decodeObjectForKey:@"LastActivityDateUtc"];
        _LastIpAddress = [aDecoder decodeObjectForKey:@"LastIpAddress"];
        _LastLoginDateUtc = [aDecoder decodeObjectForKey:@"LastLoginDateUtc"];
        _NickName = [aDecoder decodeObjectForKey:@"NickName"];
        _OpenId = [aDecoder decodeObjectForKey:@"OpenId"];
        _Password = [aDecoder decodeObjectForKey:@"Password"];
        _PasswordSalt = [aDecoder decodeObjectForKey:@"PasswordSalt"];
        _ShippingAddress = [aDecoder decodeObjectForKey:@"ShippingAddress"];
        _Signature = [aDecoder decodeObjectForKey:@"Signature"];
        _SystemName = [aDecoder decodeObjectForKey:@"SystemName"];
        _Tel = [aDecoder decodeObjectForKey:@"Tel"];
        _Username = [aDecoder decodeObjectForKey:@"PasswoUsernamerdSalt"];
        _VendorId = [aDecoder decodeObjectForKey:@"VendorId"];
        _Unionid = [aDecoder decodeObjectForKey:@"Unionid"];
        

    }
    return self;
}


#pragma mark - NSCoping
- (id)copyWithZone:(NSZone *)zone {
    JUserInfoModel *copy = [[[self class] allocWithZone:zone] init];
    copy.CustomerId = self.CustomerId;
    copy.Active = self.Active;
    copy.AffiliateId = self.AffiliateId;
    copy.Deleted = self.Deleted;
    copy.HasShoppingCartItems = self.HasShoppingCartItems;
    copy.Id = self.Id;
    copy.IsSystemAccount = self.IsSystemAccount;
    copy.IsTaxExempt = self.IsTaxExempt;
    copy.PasswordFormat = self.PasswordFormat;
    copy.PasswordFormatId = self.PasswordFormatId;
    copy.Score = self.Score;
    copy.Sex = self.Sex;

    copy.ReturnRequests = [self.ReturnRequests copyWithZone:zone];
    copy.ShoppingCartItems = [self.ShoppingCartItems copyWithZone:zone];
    copy.ExternalAuthenticationRecords = [self.ExternalAuthenticationRecords copyWithZone:zone];
    copy.CustomerRoles = [self.CustomerRoles copyWithZone:zone];
    copy.Addresses = [self.Addresses copyWithZone:zone];
    copy.AdminComment = [self.AdminComment copyWithZone:zone];
    copy.BillingAddress = [self.BillingAddress copyWithZone:zone];
    copy.CreatedOnUtc = [self.CreatedOnUtc copyWithZone:zone];
    copy.CustomerGuid = [self.CustomerGuid copyWithZone:zone];
    copy.Email = [self.Email copyWithZone:zone];
    copy.HeadImg = [self.HeadImg copyWithZone:zone];
    copy.LastActivityDateUtc = [self.LastActivityDateUtc copyWithZone:zone];
    copy.LastIpAddress = [self.LastIpAddress copyWithZone:zone];
    copy.LastLoginDateUtc = [self.LastLoginDateUtc copyWithZone:zone];
    copy.NickName = [self.NickName copyWithZone:zone];
    copy.OpenId = [self.OpenId copyWithZone:zone];
    copy.PasswordSalt = [self.PasswordSalt copyWithZone:zone];
    copy.Password = [self.Password copyWithZone:zone];
    copy.ShippingAddress = [self.ShippingAddress copyWithZone:zone];
    copy.Signature = [self.Signature copyWithZone:zone];
    copy.SystemName = [self.SystemName copyWithZone:zone];
    copy.Tel = [self.Tel copyWithZone:zone];
    copy.Username = [self.Username copyWithZone:zone];
    copy.VendorId = [self.VendorId copyWithZone:zone];
    copy.Unionid = [self.Unionid copyWithZone:zone];

    return copy;
}
@end
